package com.yang.job.client.dto.common;


public enum ErrorCode {
    SUCCESS(200, "操作成功"),
    FAIL(400, "操作失败"),
    UN_LEGAL_CLASS_PATH(400, "类路径不合法"),
    EXECUTE_STRATEGY_NO_EXIST(400, "执行策略不存在"),
    ERROR(500, "服务器错误"),
    EVENT_HANDLE_NOT_SUBSCRIBE(500, "EventHandler没有Subscribe注解，无法订阅事件"),
    EVENT_HANDLE_SUBSCRIBE_TOO_MANY_METHOD(500, "EventHandler只能存在一个Subscribe订阅方法"),
    EVENT_HANDLE_SUBSCRIBE_METHOD_PARAM_ERROR(500, "EventHandler的Subscribe订阅方法参数有误");

    private Integer code;

    private String msg;

    ErrorCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}

